package com.designpattern.fourthchapter;

public class SimplePizzaFactory {
	
	public Pizza createPizza(String type) {
		Pizza pizza = null;
		if (type.equals("cheese")) {
			pizza = new CheesePizza();
		} else if(type.equals("pepperoni")) {
			pizza = new PeppperonPizza();
		} else if(type.equals("pepperoni")) {
			pizza = new VeggiePizza();
		}
		return pizza;
		
	}

}
